Crea il file "Update_SoftCam_Keys.sh" all'interno della cartella "/usr/script" e scrivi all'interno:
Code:
#!/bin/sh
#DESCRIPTION=This script updates SoftCam Keys
wget http://www.softcam.tv/deneme6.php?file=SoftCam.Key -q -O /usr/keys/SoftCam.Key
chmod 644 /usr/keys/SoftCam.Key
echo ""
exit 0
e imposta i permessi 755 al file.
Lo script precedente scaricherà il file "SoftCam.Key" aggiornato, lo sovrasciverà a quello attuale (se esistente), e assegnerà i permessi 644 al file.
Adesso devi impostare un cron per poterlo eseguire ad esempio ogni giorno o ogni 12h.
Cron ogni giorno a mezzanotte:
Code:
0 0 * * * /usr/script/Update_SoftCam_Keys.sh > /dev/null 2>&1
Cron ogni 12h:
Code:
0 */12 * * * /usr/script/Update_SoftCam_Keys.sh > /dev/null 2>&1
Se non sei capace di creare un cron, dai questi comandi in telnet/putty (l'esempio imposta il cron ogni 12h):
Code:
echo "0 */12 * * * /usr/script/Update_SoftCam_Keys.sh > /dev/null 2>&1" > /tmp/job
crontab -r
crontab /tmp/job
rm /tmp/job